body {
    /* background: #f2f2f2; */
    background: #282c34;
}

.frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    border-radius: 2px;
    box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background: #57d895;
    color: #fff;
    font-family: 'Open Sans', Helvetica, sans-serif;
}

.hidden {
    display: none;
}

.button {
    box-sizing: border-box;
    position: absolute;
    display: block;
    width: 260px;
    height: 60px;
    top: 170px;
    left: 70px;
    border: 2px solid #fff;
    border-radius: 30px;
    text-align: center;
    line-height: 56px;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;

    &:hover {
        background: #37be77;
    }

    img {
        position: absolute;
        z-index: 2;
        top: 16px;
        left: 15px;
        opacity: 0;
    }
}

.circle {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 2;
    top: 170px;
    left: 170px;
    fill: none;
    stroke: #fff;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-dasharray: 183 183;
    stroke-dashoffset: 183;
    pointer-events: none;
    transform: rotate(-90deg);
}

input:checked {
    & ~ .button {
        animation: button 0.5s ease both, fill 0.5s ease-out 1.5s forwards;

        img {
            animation: check 0.5s ease-out 1.5s both;
        }
    }

    & ~ .circle {
        animation: circle 2s ease-out 0.5s both;
    }
}

@keyframes button {
    0% {
        width: 260px;
        left: 70px;
        border-color: #fff;
        color: #fff;
    }
    50% {
        color: transparent;
    }
    100% {
        width: 60px;
        left: 170px;
        border-color: #45b078;
        background: transparent;
        color: transparent;
    }
}

@keyframes fill {
    0% {
        background: transparent;
        border-color: #fff;
    }
    100% {
        background: #fff;
    }
}

@keyframes check {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes circle {
    0% {
        stroke-dashoffset: 183;
    }
    50% {
        stroke-dashoffset: 0;
        stroke-dasharray: 183;
        transform: rotate(-90deg) scale(1);
        opacity: 1;
    }
    90%,
    100% {
        stroke-dasharray: 500 500;
        transform: rotate(-90deg) scale(2);
        opacity: 0;
    }
}
